package com.hzqy.persistence.dao.weather;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import com.hzqy.persistence.dao.core.PersistenceDao;
import com.hzqy.web.vo.WeatherCommonVo;
import com.hzqy.web.vo.WeatherCommonVo;

@Repository
public class WeatherDao extends PersistenceDao<WeatherCommonVo, Integer>{
	protected final Logger LOG = LoggerFactory.getLogger(getClass());
	
	public int selectWeatherCommonCount(WeatherCommonVo weatherCommonVo) {
		String namespace = this.getNamespace();
		return getSqlSession().selectOne(namespace + "selectWeatherCommonCount", weatherCommonVo);
	}
	
	public List<WeatherCommonVo> selectWeatherCommonList(Map<String,Object> map){
		String namespace = this.getNamespace();
		return getSqlSession().selectList(namespace + "selectWeatherCommonList", map);
	}
	public WeatherCommonVo selectWeatherCommonVo(String f_wfc_id){
		String namespace = this.getNamespace();
		return getSqlSession().selectOne(namespace + "selectWeatherCommonVo", f_wfc_id);
	}
	
	public int deleteWeatherCommonVo(String f_wfc_id) {
		String namespace = this.getNamespace();
		return getSqlSession().update(namespace + "deleteWeatherCommonVo", f_wfc_id);
	}
	
	public int insertWeatherCommonVo(WeatherCommonVo weatherVo) {
		return getSqlSession().insert(this.getNamespace() + "insertWeatherCommonVo", weatherVo);
	}
	
	public int updateWeatherCommonVo(WeatherCommonVo weatherVo) {
		return getSqlSession().update(this.getNamespace() + "updateWeatherCommonVo", weatherVo);
	}
}
